﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LdtJudge.DataEngine.Model.ElmentModel
{
    /// <summary>
    /// 提取类型枚举
    /// </summary>
    public enum ExtractType
    {
        yuangao = 1,//原告要素
        beigao = 2,//被告要素
        evid = 3,//证据要素
        noargument = 12,//无争议要素 无争议事实xml提取
        plotorsituation = 18,// 情形情节匹配
        jianchajiguan = 28,//检查机关
        gongsujiguan = 24,//公诉机关
        weifaxingwei=29,//违法行为
        weifaqingxing=32,//违法情形
        cailiangqingjie=123,
        xingzhengjiguan=30, //行政机关
        jieguoyaosu=30


    }
    /// <summary>
    /// 根据当前的要素提取流程，要素提取规则配置对象
    /// </summary>
    [Serializable]
    public class CommElementRegexCode : ICloneable
    {
        /// <summary>
        /// 案件类型
        /// </summary>
        public string CaseType { get; set; }
        /// <summary>
        /// 文书编号
        /// </summary>
        public string SourceCode { get; set; }
        /// <summary>
        /// 文本格式
        /// </summary>
        public int TextType { get; set; }
        /// <summary>
        /// 逻辑段编号
        /// </summary>
        public string PargarphCode { get; set; }
        /// <summary>
        /// 逻辑段条件=、<>、
        /// </summary>
        public string PargarphWhere { get; set; }


        /// <summary>
        /// 用途
        /// </summary>
        public ExtractType Purpose { get; set; }

        /// <summary>
        /// 正则编号
        /// </summary>
        public string RegexCode { get; set; }

        /// <summary>
        /// 正则参数
        /// </summary>
        public string RegexParameter { get; set; }
        /// <summary>
        /// 正则执行状态
        /// 1、正常；2、超时
        /// </summary>
        public int RegexExtState { get; set; }
        /// <summary>
        /// 正则执行时间
        /// </summary>
        public long RegexExtTime { get; set; }

        /// <summary>
        /// 赋值一个对象
        /// </summary>
        /// <returns></returns>
        public object Clone()
        {
            CommElementRegexCode commElementRegex = new CommElementRegexCode();
            commElementRegex.CaseType = CaseType;
            commElementRegex.SourceCode = SourceCode;
            commElementRegex.TextType = TextType;
            commElementRegex.PargarphCode = PargarphCode;
            commElementRegex.Purpose = Purpose;
            commElementRegex.RegexCode = RegexCode;
            commElementRegex.RegexParameter = RegexParameter;
            commElementRegex.RegexExtState = RegexExtState;
            commElementRegex.RegexExtTime = RegexExtTime;
            return commElementRegex;
        }
    }
}
